<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let firstStr = ''
        let arr = []
        for(let i = 0;i < 8; i++){
            firstStr +=2;
            arr.push(firstStr)
        }
        let newArr = arr.map(item =>{
            return Number(item)
        })
        console.log(arr)
        console.log(newArr)

        let total = newArr.reduce((prev,next) => {
            return prev + next
        })
        console.log(total)
    </script>
</body>
</html>